﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KSOAdmin.Models.Base
{
    /// <summary>
    /// 公共字段
    /// </summary>
    public class BaseModel
    {
        [Key]
        [Display(Name = "ID")]
        [Column(TypeName = "int")]
        [Required(AllowEmptyStrings = false)]
        public int ID { get; set; }

        /// <summary>
        ///创建ID
        /// </summary>
        [Display(Name = "CreateID")]
        [Column(TypeName = "int")]
        public int? CreateID { get; set; }

        /// <summary>
        ///创建时间
        /// </summary>
        [Display(Name = "CreateDate")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? CreateDate { get; set; }

        ///// <summary>
        /////创建人
        ///// </summary>
        //[Display(Name = "创建人")]
        //[MaxLength(400)]
        //[Column(TypeName = "nvarchar(400)")]
        //[Editable(true)]
        //public string Creator { get; set; }

        ///// <summary>
        /////修改人
        ///// </summary>
        //[Display(Name = "修改人")]
        //[MaxLength(400)]
        //[Column(TypeName = "nvarchar(400)")]
        //public string Modifier { get; set; }

        /// <summary>
        ///修改时间
        /// </summary>
        [Display(Name = "修改时间")]
        [Column(TypeName = "datetime")]
        public DateTime? ModifyDate { get; set; }

        /// <summary>
        /// 修改ID
        /// </summary>
        [Display(Name = "ModifyID")]
        [Column(TypeName = "int")]
        public int? ModifyID { get; set; }

        /// <summary>
        ///是否可用
        /// </summary>
        [Display(Name = "是否可用")]
        [Column(TypeName = "tinyint")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public byte Enable { get; set; }
    }
}
